import sys
from PyQt4 import QtCore, QtGui,QtNetwork
from PyQt4 import QtWebKit



class Ticker(QObject):

    def __init__(self):
        QObject.__init__, (self)
        self.timer = self.startTimer(1000)

    def timerEvent(self, ev):
        self.emit(PYSIGNAL("ticker")())
        QObject.connect(self.tickerevent, PYSIGNAL("ticker"), self.hello)

    def hello():
        print 'hi it works'

x=Ticker()

if __name__ == '__main__':

    app = QApplication(sys.argv)
    win = frm()
    app.setMainWidget(win)
    win.show()
    QObject.connect(app, SIGNAL('lastWindowClosed()'),app, SLOT('quit()'))
    app.exec_loop()